STEP 11: Let's add a loop with commands to dance a two_step(). The loop will run every time the function is called!

  • Click LOGIC then and drop Loop with Range INSIDE the two_step() function.
  • Change the integer in range() to set the range of the loop to 6.
  • Drop Flip Right Left INSIDE the loop. It should be indented twice, once for the function, once for the loop!
  • Drop Wait INSIDE the loop and change the wait time to 1 second. It should be indented twice.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)